require 'queue_client'
lc = QueueClient.instance
lc.set_options({:host => 'localhost', :port => 5672, :amqp_queue_name => 'logger_test'})
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')
lc.log('hello1')



#require 'rubygems'
#require 'mq'
#EM.run {
  #amq = MQ.new
  #trap("INT") do
    #puts "captured ctrl-c"
    #amq.close
    #EM.stop
    #Kernel.exit(0)
  #end
  #EM.add_periodic_timer(2){ #TODO: timer should be configurable
    #t = Time.now.to_s
    #puts t
    #amq.queue('logger_test').publish(">> #{t}")
  #}
#}


